home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 34
/
034.d81
/
labyrinth 101
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
103 lines
2 poke55,255:poke56,55:poke650,128
5 a=a+1:ifa=1thenload"labyrinth.fnt",8,1
7 poke53272,(peek(53272)and240)or14
10 poke53280,.:poke53281,.
20 print"[147] [196]ispute?'s [199]azelle presents:":ch=28:nm=.:fi=1264:sb=.
25 print"[150] [204]abyrinth 101"
26 print" by [205]ike [205]aynard"
27 print"[153] [211]elect difficulty level:"
30 printtab(14)"1. [154][206]ovice"
40 printtab(14)"2. [154][197]xpert"
50 printtab(14)"3. [154][209]uit":poke198,.
55 print"[153] [208]ress selection..."
60 geta$:ifa$=""then60
70 ifa$="1"thenne$="[206]ovice":goto100
80 ifa$="2"thenne$="[197]xpert":goto100
90 ifa$="3"thengosub2140
95 goto60
100 print"[154][208]lease wait while generating maze."
101 print"[195]alculating: ":in=int(rnd(0)*100)+1000
102 fora=10334to545215stepin:print"[145][159]"tab(13)a:next:print
103 ifa$="1"thenprint"[200]mmm... [212]his one shouldn't be too hard."
104 ifa$="2"thenprint"[200]mmm... [212]his one may take you a while."
105 print" [154][208]ress [211][208][193][195][197] [154]to start."
106 getb$:ifb$<>" "then106
108 ad=1644:mn=20:print"[147] [154][204]abyrinth 101 [[155]"ne$"[154]]"
109 print"[154] [208]ress [209] [154]to quit."
110 ifa$="1"thengosub1000:ad=1644:mn=20: rem draw novice maze
120 ifa$="2"thengosub1100:ad=1644:mn=0: rem draw expert maze
130 print"[129][213]se [158][211][200][201][198][212] [210][197][212][213][210][206][129], [158][198]6[129], [158][195][207][205][205][207][196][207][210][197] [197][129],"
135 print"and [158][195][212][210][204] [201] [129]to move up, right, down,"
140 print"and left, respectfully."
145 print"([193] joystick in port [150]2 will work also.)"
150 pokead,ch:poke54272+ad,1:ifad<fithen800
151 j2=(peek(56320)and15):geta$
152 if(07eorj2)<>15thena$=chr$(141)
153 if(13eorj2)<>15thena$=""
154 if(11eorj2)<>15thena$="[139]"
155 if(14eorj2)<>15thena$="[177]"
160 ifa$<>chr$(141)anda$<>""anda$<>"[139]"anda$<>"[177]"anda$<>"q"then151
170 ifa$=chr$(141)thena=-40
175 ifa$=""thena=-1
180 ifa$="[139]"thena=1
185 ifa$="[177]"thena=40
190 ifa$="q"andnm<mnthengosub2100:goto151
195 ifa$="q"andnm>=mnthen900
200 ifpeek(ad+a)=32thenpokead,32:ad=ad+a:a=.:hi=1:gosub2000:nm=nm+1
205 ifpeek(ad+a)=32thengosub300:goto150
210 hi=95:gosub2000:goto151
300 if(ad<>1414)or(sb)thenreturn
310 sb=1
320 print"[189] [173]"
330 print"[178][157][221][157][189]";:return
800 print"";
802 fora=1to4:print" ":next:print"[145][145][145][145]";
805 print"[158][193]-mazing!! [217]ou made it out of the maze!"
810 print"[154] [208]ress [211][208][193][195][197][154] to continue. ":poke198,.
820 geta$:ifa$<>" "then820
830 goto10
900 print" [211]o close, yet so far ... "
910 fora=1to3000:next:goto10
999 end
1000 print" [221][158][197][216][201][212]![221]"
1005 print" [221] [221]"
1008 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
1010 print"[221] [221]";
1020 print"[221] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174] [221]";
1030 print"[221] [221] [221] [221]";
1040 print"[221] [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192] [221] [221]";
1050 print"[221] [221] [221]";
1060 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189] [221]";
1070 print" [221] [221]";
1080 print" [221] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
1090 print" [221] [221]"
1095 print" [221][158][197][206][212][197][210][221]"
1099 return
1100 print" [221][158][197][216][201][212]![221]"
1105 print" [221] [221]"
1108 print"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179] [171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
1110 print"[221] [221] [221] [221]";
1120 print"[221] [176][192][192][192][192][192][192][192][192][192][192][192][192][179] [171][192][192][192][192][192][192][192][192][192][192][192][174] [221]";
1130 print"[221] [221] [221] [221] [221] [221]";
1140 print"[221] [173][192][192][192][192][192][192][192][192][192][192][192][192][179] [171][192][192][192][192][192][192][192][192] [221] [221]";
1150 print"[221] [221] [221] [221] [221]";
1160 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179] [171][192][192][192][192][192][192][192][192][192][192][192][189] [221]";
1170 print" [221] [221] [221]";
1180 print" [221] [171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
1190 print" [221] [221]"
1195 print" [221][158][197][206][212][197][210][221]"
1199 return
2000 poke54296,15:poke54276,.:poke54273,hi:poke54272,100
2010 poke54277,5:poke54278,5:poke54276,33:return
2100 ifnm<20then2200
2110 print"[154][145] [193]re you sure you want to quit? ([217][154]/[206][154])":poke198,.
2120 geta$:ifa$<>"y"anda$<>"n"then2120
2130 ifa$="n"then2220
2140 open15,8,15,"r0:connect=connect":input#15,er:close15:ifer<>63thenend
2145 poke53272,23:poke55,.:poke56,160
2150 load "connect",8
2200 print"[150] [217]ou give up too easy."
2210 fora=1to2000:next
2220 print"[145] [154][208]ress [209] [154]to quit. "
2230 poke198,.:return